<?php 
session_start();
$novo_chat = $_SESSION['nome'];
print_r($novo_chat);
echo $novo_chat->getNome();
die();
include ("auth.php"); 
require ('config/config.php');
$chat = new Chat(); 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="content-language" content="pt-br" />
<title>Entrar no Sistema</title>
<link rel="stylesheet" type="text/csss" href="css/style.css" media="all"/>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
<script type="text/javascript" src="js/chat.js"></script>

</head>
<body>
    <h1>Bem vindo; <?php echo $_COOKIE['nome'];?> ao Nosso Chat</h1>
    <div id="painel">
    <?php 
    foreach($chat->listarClientexAtendimento($novo_chat) as $v){
        
        $ativo = ($v['nome'] == $novo_chat->getNome())    ? 'class="ativo' : '';
        printf('<p%s>[%s] - %s</p>',$ativo,$v['nome'],$v['mensagem']);
        }
    ?>
    </div>
    <form action="" method="post" id="frm-msg">
        <fieldset>
            <label>
                <span>Mensagem</span>
                <textarea name="mensagem" id="mensagem" cols="70" rows="5"></textarea>
            </label>
            <input type="button" id="submit" value="Enviar"/>
        </fieldset>
        
    </form> 
</body>